<?php
if(defined("_PARA_EVENT"))
    return;
define("_PARA_EVENT", 1);

require_once "ChatMessage.php";

class Event {

    public $id;
    public $timestamp;
    public $section;
    public $name;
    public $meta1;
    public $meta2;

    public function Event( $id, $timestamp, $section, $name, $meta1, $meta2 ) {
        $this->id          = $id;
        $this->timestamp   = $timestamp;
        $this->section     = $section;
        $this->name        = $name;
        $this->meta1       = $meta1;
        $this->meta2       = $meta2;
    }


    // comparision function for sorting by id
    public static function cmp($a, $b) {
        if($a->id == $b->id)
            return 0;
        return ( $a->id < $b->id ) ? -1 : 1;   
    }

}



?>